﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace Three_Red_Dragon_Mvc.Controllers
{
    /// <summary>
    /// 生产任务控制器
    /// </summary>
    public class ProductionTasksController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;
        public ProductionTasksController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        /// <summary>
        /// 生产任务添加视图
        /// </summary>
        /// <returns>返回实体</returns>
        public IActionResult ProductionTasksCreate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 生产任务显示视图
        /// </summary>
        /// <returns>返回实体</returns>
        public IActionResult ProductionTasksSearch()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 生产任务修改视图
        /// </summary>
        /// <returns>返回实体</returns>
        public IActionResult ProductionTasksUpdate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
    }
}
